/**
 * Copyright (c) 2014, 2017, Oracle and/or its affiliates.
 * The Universal Permissive License (UPL), Version 1.0
 */
"use strict";
/*
 Copyright 2013 jQuery Foundation and other contributors
 Released under the MIT license.
 http://jquery.org/license
*/
define(["ojs/ojcore","jquery","hammerjs","ojs/ojeditablevalue","ojs/ojinputtext","ojs/ojvalidation","ojs/ojpopup","ojs/ojbutton","ojs/ojanimation"],function(a,g,b){function c(b,c){c=b.parse(c);var d=a.Na._dateTime(c,"date fullYear month hours minutes seconds".split(" "),!0),e=new Date;e.setFullYear(d.fullYear);e.setDate(d.date);e.setMonth(d.month);e.setHours(d.hours);e.setMinutes(d.minutes);e.setSeconds(d.seconds);e.setMilliseconds(0);return e}function d(a){return this.options.converter.parse(a)}
function e(b,c){var d=b.translations.dateTimeRange||{},e=[{category:"hint",entries:["min","max","inRange"]},{category:"messageDetail",entries:["rangeUnderflow","rangeOverflow"]},{category:"messageSummary",entries:["rangeUnderflow","rangeOverflow"]}],f={min:b.min,max:b.max,converter:c};if(!g.isEmptyObject(d))for(var h=0,k=e.length;h<k;h++){var n=d[e[h].category];if(n){for(var l={},u=e[h].entries,p=0,m=u.length;p<m;p++)l[u[p]]=n[u[p]];f[e[h].category]=l}}return a.za.sx(a.Ve.VALIDATOR_TYPE_DATETIMERANGE).createValidator(f)}
function f(a,b){var c=a.filter("span");b?c.addClass("oj-disabled").removeClass("oj-enabled oj-default"):c.removeClass("oj-disabled").addClass("oj-enabled oj-default")}function h(a,b,c){if(!a||b===c.length)return a;var d=b+1;return h(a[c[b]],d,c)||h(a["*"],d,c)}function k(a){return a.delegate(".oj-datepicker-prev-icon, .oj-datepicker-prev-icon .oj-clickable-icon-nocontext.oj-component-icon, .oj-datepicker-next-icon, .oj-datepicker-next-icon .oj-clickable-icon-nocontext.oj-component-icon, .oj-datepicker-calendar td a",
"mouseout",function(){g(this).removeClass("oj-hover")}).delegate(".oj-datepicker-prev-icon, .oj-datepicker-prev-icon .oj-clickable-icon-nocontext.oj-component-icon, .oj-datepicker-next-icon, .oj-datepicker-next-icon .oj-clickable-icon-nocontext.oj-component-icon, .oj-datepicker-calendar td a","mouseover",function(){g(this).addClass("oj-hover")}).delegate(".oj-datepicker-prev-icon, .oj-datepicker-prev-icon .oj-clickable-icon-nocontext.oj-component-icon, .oj-datepicker-next-icon, .oj-datepicker-next-icon .oj-clickable-icon-nocontext.oj-component-icon, .oj-datepicker-calendar td a",
"focus",function(){g(this).addClass("oj-focus")}).delegate(".oj-datepicker-prev-icon, .oj-datepicker-prev-icon .oj-clickable-icon-nocontext.oj-component-icon, .oj-datepicker-next-icon, .oj-datepicker-next-icon .oj-clickable-icon-nocontext.oj-component-icon, .oj-datepicker-calendar td a","blur",function(){g(this).removeClass("oj-focus")})}function l(a){var b=g(a.element[0]).parent().parent();a.Gk(b)}function m(a){return"native"===a.options.renderMode&&window.cordova&&window.datePicker}function r(a){a=
a.split(":");if(4!==a.length)throw Error("timeIncrement value should be in the format of hh:mm:ss:SSS");a={hN:parseInt(a[0].substring(0),10),WN:parseInt(a[1],10),qLa:parseInt(a[2],10),jKa:parseInt(a[3],10)};var b=0,c;for(c in a)b+=a[c];if(0===b)throw Error("timeIncrement must have a non 00:00:00:000 value");return a}function t(b,c){var d=b.resolvedOptions(),e={},f="hour hour12 minute second millisecond timeFormat timeZone timeZoneName isoStrFormat dst".split(" "),h,k;h=0;for(k=f.length;h<k;h++)f[h]in
d&&("timeFormat"===f[h]&&(e.formatType="time"),e[f[h]]=d[f[h]]);if(g.isEmptyObject(e))throw Error("Empty object for creating a time picker converter");g.extend(e,c||{});return a.za.dj(a.Hi.CONVERTER_TYPE_DATETIME).createConverter(e)}function s(a,b){function c(a){e.classList.remove("oj-timepicker-wheel-item-position"+f);e.classList.add("oj-timepicker-wheel-item-position"+a);f=a;return Promise.resolve()}function d(){e.parentNode.focus()}var e,f,h=!1,k=a.getText(b);if(k){e=document.createElement("div");
e.classList.add("oj-timepicker-wheel-item");e.classList.add("oj-timepicker-wheel-item-position"+b);f=b;a.JJa(b)&&(h=!0,e.classList.add("oj-disabled"));e.vKa=c;var n=document.createElement("div");n.textContent=k;n.classList.add("oj-timepicker-wheel-item-content");e.appendChild(n);Object.defineProperty(e,"ojDisabled",{enumerable:!0,get:function(){return h},set:function(a){a!==h&&(g(e).toggleClass("oj-disabled"),h=a)}});e.addEventListener("focus",d,!1);n.addEventListener("focus",d,!1)}return e}function q(a,
c,d){function e(){if(U[L+1]){h(1);var b=U.shift();b&&G.removeChild(b);(b=s(a,L))&&G.appendChild(b);U.push(b)}}function f(){if(U[L-1]){h(-1);var b=U.pop();b&&G.removeChild(b);(b=s(a,-L))&&G.insertBefore(b,U[0]);U.unshift(b)}}function h(b){for(var c=0;c<U.length;c++){var d=U[c];d&&d.vKa(c-L-b)}G.setAttribute("aria-valuenow",a.getText(0))}function k(){U.forEach(function(a){a&&G.removeChild(a)});U=[];for(var b=-L;b<=L;b++){var c=s(a,b);c&&G.appendChild(c);U.push(c)}G.setAttribute("aria-valuenow",a.getText(0))}
function n(b){var d=b.keyCode;switch(d){case Z:a.position++;b.preventDefault();break;case O:a.position--;b.preventDefault();break;case V:a.aia=a.aia.slice(0,-1);b.preventDefault();break;default:if(47<d&&58>d||95<d&&112>d||!c&&64<d&&91>d)a.keyboardValue+=b.key}}function l(b){G.focus();b=b.center.y;var c=W.offset().top,d=W.height();b=(b-c)/d;for(c=0;4>c&&b>F[c];)c++;2!==c&&(a.position+=c-2)}function u(a){G.focus();var b=a.velocityY;T=Math.floor(b*b/R/W.height()*5);a.preventDefault()}function p(a){G.focus();
var b=a.velocityY;T=-Math.floor(b*b/R/W.height()*5);a.preventDefault()}function m(a){G.focus();P=da=a.center.y;T=X=0}function v(){G.focus();T&&(a.position+=T);X=P=da=null}function r(b){G.focus();var c=b.center.y,d=Math.round((P-c)/W.height()*5);d!==X&&Math.abs(da-c)>S&&(da=c,a.position+=d-X,X=d);b.preventDefault()}function t(b){b.deltaY&&(b.currentTarget.focus(),b.preventDefault());0>b.deltaY&&a.position++;0<b.deltaY&&a.position--}function N(){a.aia="";G.classList.add("oj-focus")}function Y(){G.classList.remove("oj-focus");
a.update()}var L=7,S=2,F=[.152,.362,.638,.848],R=.007,V=8,Z=38,O=40,G,U=[],P,da,X,T;(function(b){G=document.createElement("div");G.classList.add("oj-timepicker-wheel");b&&G.classList.add(b);G.setAttribute("id","_ojWheel"+q.RGa++);G.setAttribute("tabIndex","0");G.setAttribute("role","spinbutton");a.tx=G})(d);var W=g(G);(function(){G.uKa=e;G.tKa=f;G.cja=k;G.bja=function(){return a.linked}})();(function(){var a=new b(G);a.get("pan").set({direction:b.DIRECTION_VERTICAL});a.get("swipe").set({direction:b.DIRECTION_VERTICAL});
a.on("tap",l);a.on("swipeup",u);a.on("swipedown",p);a.on("panstart",m);a.on("panend pancancel",v);a.on("panup pandown",r);G.addEventListener("wheel",t,!1);G.addEventListener("keydown",n,!1);G.addEventListener("focus",N,!1);G.addEventListener("blur",Y,!1)})();k();return G}function p(){function a(c){try{if(da=!0,c)for(var d in c)X[d]=c[d]}finally{da=!1,b()}}function b(){if(!da){r=Math.ceil(q/v)*v;t=Math.ceil((s-1)/v)*v;if(t<r)throw Error("Invalid min and max settings with current increment: "+q+" "+
s+ +v);m<r&&(m=r);m>t&&(m=t);m=Math.round(m/v)*v;if(F){G.displayRange=12;var a=R;"auto"===a&&(a=k(v,60),a=a===v||60===a?"hoursMeridiem":"all");switch(a){case "all":O.displayMultiplier=1;O.valueMultiplier=1;O.valueRange=1440;O.linked=!0;G.displayMultiplier=60;G.valueMultiplier=1;G.valueRange=1440;G.linked=!0;U.displayMultiplier=1;U.valueMultiplier=720;U.valueRange=2;U.linked=!0;break;case "none":O.displayMultiplier=1;O.valueMultiplier=1;O.valueRange=60;O.linked=!1;G.displayMultiplier=1;G.valueMultiplier=
60;G.valueRange=12;G.linked=!1;U.displayMultiplier=1;U.valueMultiplier=720;U.valueRange=2;U.linked=!1;break;case "hoursMinutes":O.displayMultiplier=1;O.valueMultiplier=1;O.valueRange=720;O.linked=!0;G.displayMultiplier=60;G.valueMultiplier=1;G.valueRange=720;G.linked=!0;U.displayMultiplier=1;U.valueMultiplier=720;U.valueRange=2;U.linked=!1;break;case "hoursMeridiem":O.displayMultiplier=1,O.valueMultiplier=1,O.valueRange=60,O.linked=!1,G.displayMultiplier=1,G.valueMultiplier=60,G.valueRange=24,G.linked=
!0,U.displayMultiplier=1,U.valueMultiplier=720,U.valueRange=2,U.linked=!0}}else switch(G.HNa=24,a=R,"auto"===a&&(a=k(v,60),a=a===v||60===a?"none":"all"),a){case "none":case "hoursMeridiem":O.displayMultiplier=1;O.valueMultiplier=1;O.valueRange=60;O.linked=!1;G.displayMultiplier=1;G.valueMultiplier=60;G.valueRange=24;G.linked=!1;break;case "all":case "hoursMinutes":O.displayMultiplier=1,O.valueMultiplier=1,O.valueRange=1440,O.linked=!0,G.displayMultiplier=60,G.valueMultiplier=1,G.valueRange=1440,G.linked=
!0}for(a=0;a<P.length;a++)P[a].refresh()}}function c(a){a=n.exec(a);return 60*parseInt(a[1],10)+parseInt(a[2],10)}function d(a){a=Math.floor(a);var b=Math.floor(a/60);a%=60;return"T"+e(b)+":"+f(a)}function e(a){return("0"+a).slice(-2)}function f(a){return("0"+a).slice(-2)}function g(a){return a.match(/^\d+$/)?parseInt(a,10):-1}function h(a){return a.match(/^\d+$/)?(a=parseInt(a,10),0===a&&(a=-1),12===a&&(a=0),a):-1}function k(a,b){return 0===b?a:k(b,a%b)}var n=/^.*T(\d{2})(?::?(\d{2}).*$)/,l={h:function(a){return 0===
a?"12":""+a},hh:function(a){return 0===a?"12":("0"+a).slice(-2)},H:function(a){return""+a},HH:e,mm:f},p={h:h,hh:h,H:g,HH:g,mm:g},m=0,v,q=0,r=0,s=1440,t=1440,S,F,R="auto",V="",Z=["AM","PM"],O=new u(this,{valueRange:60,displayRange:60,valueMultiplier:1,displayMultiplier:1}),G=new u(this,{valueMultiplier:60,displayMultiplier:1}),U=new u(this,{valueRange:2,displayRange:2,formatter:function(a){return Z[a]},parser:function(a){a=a.toLowerCase().charAt();return"a"===a?0:"p"===a?1:-1},valueMultiplier:720,
displayMultiplier:1}),P=[O,G,U],da=!1,X=this;(function(){da=!0;Object.defineProperty(X,"increment",{enumerable:!0,get:function(){return v},set:function(a){v=Math.floor(a);b()}});X.increment=1;Object.defineProperty(X,"grouped",{enumerable:!0,get:function(){return R},set:function(a){switch(a){case "auto":case "all":case "none":case "hoursMinutes":case "hoursMeridiem":R=a;break;default:throw Error("invalid grouped value: "+a);}b()}});Object.defineProperty(X,"min",{enumerable:!0,get:function(){return q},
set:function(a){q=Math.floor(a);b()}});Object.defineProperty(X,"isoMin",{enumerable:!0,get:function(){return d(q)},set:function(a){var b=c(a);isNaN(b)?console.log("Invalid ISO min time: "+a):X.min=b}});Object.defineProperty(X,"max",{enumerable:!0,get:function(){return s-1},set:function(a){s=Math.floor(a)+1;b()}});Object.defineProperty(X,"isoMax",{enumerable:!0,get:function(){return d(s)},set:function(a){var b=c(a);isNaN(b)?console.log("Invalid ISO max time: "+a):X.max=b}});Object.defineProperty(X,
"value",{enumerable:!0,get:function(){return m},set:function(a){m=Math.floor(a);b()}});Object.defineProperty(X,"isoValue",{enumerable:!0,get:function(){return d(m)},set:function(a){var b=c(a);isNaN(b)?console.log("Invalid ISO value time: "+a):X.value=b}});Object.defineProperty(X,"format",{enumerable:!0,get:function(){return S},set:function(a){S=a;a=a.replace(/\'[^']*\'/g,"").replace(/[^hHma]*/g,"");V=a.replace(/(h|H)+/,"h").replace(/m+/,"m");var c=a.match(/([hH]+)/),c=c[1];G.formatter=l[c];G.parser=
p[c];c=a.match(/(m+)/);a=c[1];O.formatter=l[a];O.parser=p[a];F=0<=V.indexOf("a");b()}});Object.defineProperty(X,"wheelOrder",{enumerable:!0,get:function(){return V}});Object.defineProperty(X,"ampmStrings",{enumerable:!0,get:function(){return Z},set:function(a){Z=a}});da=!1})();X.yLa=a;a(null);X.bZ=function(a){switch(a){case "hour":return G;case "minute":return O;case "ampm":return F?U:null;default:console.log("Unknown wheel type: "+a)}}}function n(a){function b(a){a=a.target;if(a.bja())for(a=0;a<
f.length;a++)f[a].bja()&&f[a].classList.add("oj-active");else a.classList.add("oj-active")}function c(){for(var a=0;a<f.length;a++)f[a].classList.remove("oj-active")}function d(){for(var g;g=e.firstChild;)e.removeChild(g);f=[];var h=a.wheelOrder;g=a.bZ("hour");g=q(g,!0,"oj-timepicker-hour");var k=a.bZ("minute"),k=q(k,!0,"oj-timepicker-minute"),n;0<=h.indexOf("a")&&(n=a.bZ("ampm"),n=q(n,!1,"oj-timepicker-meridian"));for(var l=h.split(""),h=0;h<l.length;h++)switch(l[h]){case "h":f.push(g);break;case "m":f.push(k);
break;case "a":f.push(n);break;default:console.log("Unknown wheelOrder code: "+l[h])}for(h=0;h<f.length;h++)n=f[h],n.addEventListener("focus",b,!1),n.addEventListener("blur",c,!1),e.appendChild(n)}var e,f=[];e=document.createElement("div");e.classList.add("oj-timepicker-wheel-group");e.cja=d;e.addEventListener("keydown",function(a){var b=a.target;switch(a.keyCode){case 37:g(b).prev().focus();break;case 39:g(b).next().focus()}},!1);d();return e}function u(a,b){function c(a){if(a)for(var b in a)P[b]=
a[b]}function d(){var b=!1,c=a.value;P.value=g(Math.floor(c/V),v);var e=a.max,e=Math.floor(c/Z)===Math.floor(e/Z)?g(Math.floor(e/V),v)+1:v;F!==e&&(b=!0,F=e);e=a.min;c=Math.floor(c/Z)===Math.floor(e/Z)?g(Math.floor(e/V),v):0;t!==c&&(b=!0,t=c);c=a.increment;e=h(c,Z);e===Z?(t=0,F=1,b=!0):e=P.linked&&c>V?c:0===g(e,V)?e/V:1;q!==e&&(q=e,b=!0);r=Math.floor(v/q);R=4<r;P.tx&&b&&P.tx.cja()}function e(){Z=V*v;G=O*m}function f(){n.forEach(function(a){P.tx.classList.remove("oj-timepicker-wheel-spin-"+a)});var a=
Math.abs(u-p);if(0===a)U=!1;else{var b;a--;a=Math.min(a,n.length-1);b=n[a];P.tx.classList.add("oj-timepicker-wheel-spin-"+n[a]);u>p&&(p++,P.tx.uKa());u<p&&(p--,P.tx.tKa());b&&setTimeout(f.bind(P),b)}}function g(a,b){return(a%b+b)%b}function h(a,b){return 0===b?a:h(b,a%b)}function k(a,b){return Math.floor(a/Z)*Z+g(b,v)*V+g(a,V)}var n=[150,100,50,25,16],l=0,u=0,p=0,m=1,v=1,q=1,r,s="",t,F,R,V,Z,O=1,G,U=!1,P=this;(function(){Object.defineProperty(P,"position",{enumerable:!0,get:function(){return u},set:function(a){var b=
g(a,r)*q;b>=t&&b<F&&a!==u&&(P.value+=(a-u)*q)}});Object.defineProperty(P,"value",{enumerable:!0,get:function(){return l},set:function(b){b=Math.round(b/q)*q;if((R||t<=b&&b<F)&&l!==b){l=g(b,v);b=g(Math.floor(l/q),r);var c=g(P.position,r),d=b-c;R&&(b>c?c+r-b<Math.abs(d)&&(d=b-c-r):b+r-c<Math.abs(d)&&(d=b+r-c));0!==d&&(u+=d,P.tx?U||(U=!0,f.call(P)):p=u);P.linked&&(a.value=k(a.value,l))}}});Object.defineProperty(P,"increment",{enumerable:!0,get:function(){return q},set:function(a){q!==a&&(q=a,e())}});
Object.defineProperty(P,"valueMultiplier",{enumerable:!0,get:function(){return V},set:function(a){V!==a&&(V=a,e())}});Object.defineProperty(P,"valueRange",{enumerable:!0,get:function(){return v},set:function(a){v!==a&&(v=a,e())}});Object.defineProperty(P,"displayMultiplier",{enumerable:!0,get:function(){return O},set:function(a){O!==a&&(O=a,e())}});Object.defineProperty(P,"displayRange",{enumerable:!0,get:function(){return m},set:function(a){m!==a&&(m=a,e())}});Object.defineProperty(P,"keyboardValue",
{enumerable:!0,get:function(){return s},set:function(a){s=a;P.parser&&s&&(a=P.parser(s),0<=a&&(a=Math.floor(l/G)*G+g(a,m)*O+g(l,O),t<=a&&a<F&&(P.value=a)),2<=s.length?s="":setTimeout(function(){s=""},1E3))}})})();(function(){P.getText=function(a){var b,c=g(p,r)+a,c=R||0<=c&&c<r;P.formatter&&c&&(b=P.formatter(g(Math.floor(g(g(p+a,r)*q,v)/O),m)));return b};P.JJa=function(a){a=g(p+a,r)*q;return 0!==t&&a<t||F!==v&&a>=F?!0:!1};P.update=function(){a.value=k(a.value,l)};P.refresh=d;P.yLa=c})();c(b)}var v=
a.za.dj(a.Hi.CONVERTER_TYPE_DATETIME).createConverter({year:"numeric"});a.Ra("oj.ojInputDate",g.oj.inputBase,{version:"1.0.0",widgetEventPrefix:"oj",_CLASS_NAMES:"oj-inputdatetime-input",_WIDGET_CLASS_NAMES:"oj-inputdatetime-date-only oj-component oj-inputdatetime",_ELEMENT_TRIGGER_WRAPPER_CLASS_NAMES:"",_INPUT_HELPER_KEY:"inputHelp",_ATTR_CHECK:[{attr:"type",setMandatory:"text"}],_GET_INIT_OPTIONS_PROPS:[{ha:"disabled",Sd:!0},{ha:"pattern"},{ha:"title"},{ha:"placeholder"},{ha:"value",wh:d},{ha:"required",
wh:!0,Sd:!0},{ha:"readonly",option:"readOnly",Sd:!0},{ha:"min",wh:d},{ha:"max",wh:d}],UQ:"oj-inputdatetime-input-trigger",TQ:"oj-inputdatetime-calendar-icon",PP:"oj-datepicker-current-day",Vx:"oj-datepicker-days-cell-over",UH:"oj-datepicker-unselectable",S1:"oj-datepicker-desc",QB:"oj-datepicker-calendar",zna:"oj-datepicker-div",ina:"oj-datepicker-inline",aQ:" oj-inputdatetime-input-container",jna:" oj-inputdatetime-inline",fs:"selection",ds:"cancelled",AH:"tab",Eg:"close",lna:"enabled",eQ:"disabled",
options:{datePicker:{footerLayout:"",changeMonth:"select",changeYear:"select",currentMonthPos:0,daysOutsideMonth:"hidden",numberOfMonths:1,showOn:"focus",stepMonths:"numberOfMonths",stepBigMonths:12,weekDisplay:"none",yearRange:"c-10:c+10"},converter:a.za.dj(a.Hi.CONVERTER_TYPE_DATETIME).createConverter({day:"2-digit",month:"2-digit",year:"2-digit"}),keyboardEdit:"enabled",max:void 0,min:void 0,pickerAttributes:null,renderMode:"jet",dayFormatter:null},sH:function(){this.Sl=this.xf=null;this.Uo=this.qn=
this.PD=this.ew=!1;this.Xv=4;this.Ml=this.Wh=this.Pk=this.Mj=this.sq=0;this.RC={};this.LK=null;var b=this.element[0].nodeName.toLowerCase();this.bf="div"===b||"span"===b;this.Qc=k(g("\x3cdiv id\x3d'"+this.Rm(this.zna)+"' role\x3d'region' aria-describedby\x3d'"+this.Rm(this.S1)+"' class\x3d'oj-datepicker-content'\x3e\x3c/div\x3e"));g("body").append(this.Qc);if(this.bf)this._WIDGET_CLASS_NAMES+=this.jna,this._CLASS_NAMES="";else{this._ELEMENT_TRIGGER_WRAPPER_CLASS_NAMES+=this.aQ;var c=this;this.SK=
this.Qc.ojPopup({initialFocus:"none",modality:"modeless",open:function(){"image"===c.options.datePicker.showOn&&c.Qc.find(".oj-datepicker-calendar").focus()},rootAttributes:{"class":"oj-datepicker-popup"}});(b=this.options.pickerAttributes)&&a.Fe.nO(this.SK.ojPopup("widget"),b)}},_ComponentCreate:function(){this.sH();var a=this._super();this.options.dayMetaData&&(this.options.dayFormatter=function(a){return function(b){return h(a,0,[b.fullYear,b.month,b.date])}}(this.options.dayMetaData));if(this.options.value){var b=
this.oc().format(this.options.value);this.wc(b,{})}this.pL(this.en());this.bf?(this.element.append(this.Qc),this.element.addClass(this.ina),this.Qc.css("display","block")):(this.dw(),this.kR());this.Dz();l(this);return a},Nh:function(){var a=this._superApply(arguments);this.y6(this.options.disabled);return a},_setOption:function(b,c,d){var e=null;if("value"===b)return c||(c=null),e=this._super(b,c,d),this.pL(c),this.Ok()&&this.li(!(this.bf&&this.wf&&this.wf[0]===document.activeElement)),e;if("dayMetaData"===
b)this._setOption("dayFormatter",function(a){return h(c,0,[a.fullYear,a.month,a.date])},d);else return e=this._super(b,c,d),"disabled"===b?this.y6(c):"max"===b||"min"===b?(this.RC[a.Ve.VALIDATOR_TYPE_DATETIMERANGE]=this.ZJ("min"),this.Px()):"readOnly"===b?(this.dw(),c&&this._hide(this.Eg)):"keyboardEdit"===b?this.dw():"dayFormatter"===b?(this.RC[a.Ve.VALIDATOR_TYPE_DATERESTRICTION]=this.ZJ("dayFormatter"),this.Px()):"converter"===b&&(this.LK=null),"datePicker"===b&&"currentMonthPos"===d.subkey&&this.pL(this.en()),
d={max:!0,min:!0,dayFormatter:!0,datePicker:!0,translations:!0},this.Ok()&&b in d&&this.li(),e},dw:function(){this.element.prop("readOnly",!(!this.options.readOnly&&!this.hV()))},hV:function(){return this.options.keyboardEdit===this.eQ},C1:function(){return this.xf},_destroy:function(){var a=this._super(),b=g(this.element[0]).parent().parent();this.AQ(b);this.element.off("focus touchstart");this.bk.off("touchstart");this.xf&&this.xf.remove();this.bf&&(this.element.removeProp("disabled"),this.element.removeProp("readonly"));
this.Qc.remove();return a},Ok:function(){return this.bf||this.SK.ojPopup("isOpen")||this.Uo},ZQ:function(){this.Sl=this._superApply(arguments);this.Sl.attr({role:"combobox","aria-haspopup":"true",tabindex:"-1"})},MV:function(){var a=this.options.datePicker.showOn;this.ew?(this.ew=!1,this.Sl.focus()):"focus"===a?this.show():this.Ok()&&this._hide(this.Eg)},EH:function(){if("focus"===this.options.datePicker.showOn)if(this.Ok())this.qn=!0,this._hide(this.Eg);else{var a=this.element[0]===document.activeElement;
this.show();this.ew=!0;a&&this.Sl.focus()}},kR:function(){var a=this.options.datePicker.showOn,b=g("\x3cspan\x3e").addClass(this.UQ),c=g("\x3cspan title\x3d'"+this.gT()+"'/\x3e").addClass(this.TQ+" oj-clickable-icon-nocontext oj-component-icon");b.append(c);this.element.on("focus",g.proxy(this.MV,this));this.element.on("touchstart",g.proxy(this.EH,this));var d=this;this.bk.on("touchstart",function(){d.PD=!0});"image"===a&&(c.css("display","block"),this.Pg?(this.element.css("border-top-left-radius",
0),this.element.css("border-bottom-left-radius",0)):(this.element.css("border-top-right-radius",0),this.element.css("border-bottom-right-radius",0)));c.on("click",function(){d.Ok()?d._hide(d.Eg):(d.show(),d.Qc.find(".oj-datepicker-calendar").focus());return!1});this.We(c);this.Gk(c);this.xf=b;this.element.after(b)},bta:function(a){var b;b=!1;var c=g.ui.keyCode,d=this.Pg;if(this.Ok())switch(a.keyCode){case 84:a.altKey&&a.ctrlKey&&(this.Qc.find(".oj-datepicker-current").focus(),b=!0);break;case c.SPACE:case c.ENTER:return b=
g("td."+this.Vx,this.Qc),b[0]&&this.Oca(this.Mj,this.Wh,b[0],a),a.preventDefault(),a.stopPropagation(),!1;case c.ESCAPE:this._hide(this.ds);b=!0;break;case c.PAGE_UP:a.ctrlKey&&a.altKey?this.xc(-this.options.datePicker.stepBigMonths,"M",!0):a.altKey?this.xc(-1,"Y",!0):this.xc(-this.Os(),"M",!0);b=!0;break;case c.PAGE_DOWN:a.ctrlKey&&a.altKey?this.xc(+this.options.datePicker.stepBigMonths,"M",!0):a.altKey?this.xc(1,"Y",!0):this.xc(+this.Os(),"M",!0);b=!0;break;case c.END:this.sq=this.gn(this.Wh,this.Mj);
this.li(!0);b=!0;break;case c.HOME:this.sq=1;this.li(!0);b=!0;break;case c.LEFT:this.xc(d?1:-1,"D",!0);a.originalEvent.altKey&&this.xc(a.ctrlKey?-this.options.datePicker.stepBigMonths:-this.Os(),"M",!0);b=!0;break;case c.UP:this.xc(-7,"D",!0);b=!0;break;case c.RIGHT:this.xc(d?-1:1,"D",!0);a.originalEvent.altKey&&this.xc(a.ctrlKey?+this.options.datePicker.stepBigMonths:+this.Os(),"M",!0);b=!0;break;case c.DOWN:this.xc(7,"D",!0),b=!0}else a.keyCode===c.HOME&&a.ctrlKey&&(this.show(),b=!0);b&&(a.preventDefault(),
a.stopPropagation())},eta:function(a){var b;b=!1;var c=g.ui.keyCode,d=this.Pg;if(this.Ok())switch(a.keyCode){case 84:a.altKey&&a.ctrlKey&&(this.Qc.find(".oj-datepicker-current").focus(),b=!0);break;case c.SPACE:case c.ENTER:return b=g("td."+this.Vx,this.Qc),b[0]&&this.mL(b[0],"M"),a.preventDefault(),a.stopPropagation(),!1;case c.ESCAPE:this.hide();b=!0;break;case c.PAGE_UP:a.ctrlKey&&a.altKey?this.xc(-this.options.datePicker.stepBigMonths,"M",!0,"month"):a.altKey?this.xc(-1,"Y",!0,"month"):this.xc(-this.Os(),
"M",!0,"month");b=!0;break;case c.PAGE_DOWN:a.ctrlKey&&a.altKey?this.xc(+this.options.datePicker.stepBigMonths,"M",!0,"month"):a.altKey?this.xc(1,"Y",!0,"month"):this.xc(+this.Os(),"M",!0,"month");b=!0;break;case c.END:this.Mj=11;this.li(!0,"month");b=!0;break;case c.HOME:this.Mj=0;this.li(!0,"month");b=!0;break;case c.LEFT:this.xc(d?1:-1,"M",!0,"month");b=!0;break;case c.UP:this.xc(-3,"M",!0,"month");b=!0;break;case c.RIGHT:this.xc(d?-1:1,"M",!0,"month");b=!0;break;case c.DOWN:this.xc(3,"M",!0,"month"),
b=!0}else a.keyCode===c.HOME&&a.ctrlKey&&(this.show(),b=!0);b&&(a.preventDefault(),a.stopPropagation())},gta:function(a){var b;b=!1;var c=g.ui.keyCode,d=this.Pg;if(this.Ok())switch(a.keyCode){case 84:a.altKey&&a.ctrlKey&&(this.Qc.find(".oj-datepicker-current").focus(),b=!0);break;case c.SPACE:case c.ENTER:return b=g("td."+this.Vx,this.Qc),b[0]&&this.mL(b[0],"Y"),a.preventDefault(),a.stopPropagation(),!1;case c.ESCAPE:this.hide();b=!0;break;case c.PAGE_UP:a.altKey&&this.xc(-1,"Y",!0,"year");b=!0;break;
case c.PAGE_DOWN:a.altKey&&this.xc(1,"Y",!0,"year");b=!0;break;case c.END:this.Wh=10*Math.floor(this.Wh/10)+9;this.li(!0,"year");b=!0;break;case c.HOME:this.Wh=10*Math.floor(this.Wh/10);this.li(!0,"year");b=!0;break;case c.LEFT:this.xc(d?1:-1,"Y",!0,"year");b=!0;break;case c.UP:this.xc(-3,"Y",!0,"year");b=!0;break;case c.RIGHT:this.xc(d?-1:1,"Y",!0,"year");b=!0;break;case c.DOWN:this.xc(3,"Y",!0,"year"),b=!0}else a.keyCode===c.HOME&&a.ctrlKey&&(this.show(),b=!0);b&&(a.preventDefault(),a.stopPropagation())},
li:function(b,c,d){this.Xv=4;var e;e="year"===c?this.iua():"month"===c?this.gua():this.fua();e.html="\x3cdiv class\x3d'oj-datepicker-wrapper'\x3e"+e.html+"\x3c/div\x3e";this.uq=c;if(d){var f=this.Qc.children().first();f.css({position:"absolute",left:0,top:0});this.Qc.prepend(e.html);var g=this.Qc.children().first();d="previous"==d?"end":"start";a.$.ym(g[0],"open",{effect:"slideIn",direction:d});var h=this;a.$.ym(f[0],"close",{effect:"slideOut",direction:d,persist:"all"}).then(function(){f&&f.remove();
h.uda(b,c,e.vM)})}else this.Qc.empty().append(e.html),this.uda(b,c,e.vM)},uda:function(a,b,c){var d=g("button",this.Qc);0<d.length&&(1===d.length&&g(d[0]).addClass("oj-datepicker-single-button"),g.each(d,function(a,b){g(b).ojButton()}));this.eqa();c&&this.Qc.find(".oj-datepicker-calendar").attr("aria-activedescendant",c);c=this.IJ();var d=c[1],e=275;this.Qc.removeClass("oj-datepicker-multi-2 oj-datepicker-multi-3 oj-datepicker-multi-4").width("");if("year"===b||"month"===b)this.Qc.removeClass("oj-datepicker-multi");
else{c=this.IJ();d=c[1];if(1<d){b=this.Qc.find(".oj-datepicker-calendar");var f=b.find("tbody a"),f=parseFloat(f.css("width"));b=parseFloat(b.css("margin-left"));isNaN(f)||isNaN(b)||(e=f*("number"===this.options.datePicker.weekDisplay?8:7)+2*b);this.Qc.addClass("oj-datepicker-multi-"+d).css("width",e*d+(this.bf?2:0)+"px")}this.Qc[(1!==c[0]||1!==c[1]?"add":"remove")+"Class"]("oj-datepicker-multi")}this.Ok()&&this.element.is(":visible")&&!this.element.is(":disabled")&&(a?(b=this.Qc.find(".oj-datepicker-calendar"),
b[0]!==document.activeElement&&g(b[0]).focus()):this.bf||this.element[0]===document.activeElement||this.element.focus())},xc:function(a,b,c,d,e){this.options.disabled||(this.h4(a+("M"===b?this.options.datePicker.currentMonthPos:0),b),this.li(c,d,e))},gwa:function(){var a=new Date;this.sq=a.getDate();this.Pk=this.Mj=a.getMonth();this.Ml=this.Wh=a.getFullYear();this.xc(null,null,!0,"day")},mL:function(b,c){var d,e=a.Na,f=this.en();if(d=b.getAttribute("data-year"))this.Wh=this.Ml=d=parseInt(d,10);"M"===
c?(this.Mj=this.Pk=d=parseInt(b.getAttribute("data-month"),10),e._dateTime(f,{fullYear:this.Wh,month:this.Mj})):e._dateTime(f,{fullYear:this.Wh});g("#"+this.Rm(this.QB)).html(this.Dj(this.options.monthWide[this.Pk])+" "+v.format(a.Na.dateToLocalIso(new Date(this.Ml,this.Pk,1))));this.xc(0,0,!0,"M"===c?"day":this.hFa)},Oca:function(b,c,d){g(d).hasClass(this.UH)||this.options.disabled||(this.sq=g("a",d).html(),this.Mj=b,this.Wh=c,b=a.Na,c=this.options.value,d=new Date(this.Wh,this.Mj,this.sq),c=c?b._dateTime(c,
{fullYear:d.getFullYear(),month:d.getMonth(),date:d.getDate()}):b.dateToLocalIso(d),this.BDa(c,{}),this._hide(this.fs))},BDa:function(a,b){var c=this.oc().format(a);this.Hl(c);this.wc(c,b)},L7:function(){return a.Na.dateToLocalIso(this.Xva())},pL:function(b){b=a.Na._dateTime(b||this.L7(),["fullYear","month","date"],!0);this.sq=b.date;this.Pk=this.Mj=b.month;this.Ml=this.Wh=b.fullYear;this.h4()},Os:function(){var a=this.options.datePicker.stepMonths;return g.isNumeric(a)?a:this.options.datePicker.numberOfMonths},
ID:function(a){return!this.options.disabled&&("click"===a.type||"keydown"===a.type&&32===a.keyCode)},n9:function(a){"year"===this.uq?this.xc(-10,"Y",!0,"year","previous"):"month"===this.uq?this.xc(-1,"Y",!0,"month","previous"):this.xc(-a,"M",!0,"day","previous")},m9:function(a){"year"===this.uq?this.xc(10,"Y",!0,"year","next"):"month"===this.uq?this.xc(1,"Y",!0,"month","next"):this.xc(+a,"M",!0,"day","next")},eqa:function(){var b=this.Os(),c=this;this.Qc.find("[data-handler]").map(function(){g(this).bind(this.getAttribute("data-event"),
{prev:function(a){if(c.ID(a))return c.n9(b),!1},next:function(a){if(c.ID(a))return c.m9(b),!1},today:function(a){if(c.ID(a))return c.gwa(),!1},selectDay:function(a){c.Oca(+this.getAttribute("data-month"),+this.getAttribute("data-year"),this,a);return!1},selectMonth:function(){c.mL(this,"M");return!1},selectYear:function(){c.mL(this,"Y");return!1},calendarKey:function(a){"year"===c.uq?c.gta(a):"month"===c.uq?c.eta(a):c.bta(a)},selectMonthHeader:function(a){if(c.ID(a))return"month"===c.uq?c.li(!0,"day"):
c.li(!0,"month"),!1},selectYearHeader:function(a){if(c.ID(a))return"year"===c.uq?c.li(!0,"day"):(c.hFa=c.uq,c.li(!0,"year")),!1}}[this.getAttribute("data-handler")])});this.Qc.find(".oj-datepicker-calendar").map(function(){a.D.TN({element:g(this),applyHighlight:!0})});var d=this.Qc.find(".oj-datepicker-header a, .oj-datepicker-buttonpane a");this.We(d);this.Gk(d)},Dz:function(){if(a.D.jf()){var c=this,d=this.Os(),e=this.Pg;this.Qc.rj({recognizers:[[b.Swipe,{direction:b.DIRECTION_HORIZONTAL}]]}).on(e?
"swiperight":"swipeleft",function(){c.m9(d);return!1}).on(e?"swipeleft":"swiperight",function(){c.n9(d);return!1})}},Ho:function(b){if(b=this.options[b]){var c=this.en();b=a.Na._minMaxIsoString(b,c)}return b},dD:function(a,b,c,d,e){var f,g=this.Pg;f=this.Dj(this.F("prevText"));d=d?"\x3ca role\x3d'button' href\x3d'#' class\x3d'oj-datepicker-prev-icon oj-enabled oj-default oj-component-icon oj-clickable-icon-nocontext' data-handler\x3d'prev' data-event\x3d'click keydown' title\x3d'"+f+"'\x3e\x3c/a\x3e":
"\x3ca class\x3d'oj-datepicker-prev-icon oj-disabled oj-component-icon oj-clickable-icon-nocontext' title\x3d'"+f+"'\x3e\x3c/a\x3e";f=this.Dj(this.F("nextText"));f=e?"\x3ca role\x3d'button' href\x3d'#' class\x3d'oj-datepicker-next-icon oj-enabled oj-default oj-component-icon oj-clickable-icon-nocontext' data-handler\x3d'next' data-event\x3d'click keydown' title\x3d'"+f+"'\x3e\x3c/a\x3e":"\x3ca class\x3d'oj-datepicker-next-icon oj-disabled oj-component-icon oj-clickable-icon-nocontext' title\x3d'"+
f+"'\x3e\x3c/a\x3e";e="\x3cdiv class\x3d'oj-datepicker-header"+(this.options.disabled?" oj-disabled ":" oj-enabled oj-default ")+"'\x3e";e+=/all|left/.test(c)?g?f:d:"";e+=/all|right/.test(c)?g?d:f:"";e+=this.hua(a,b);return e+"\x3c/div\x3e"},cD:function(a,b){var c="",d=this.Dj(this.F("currentText")),e="\x3ca role\x3d'button' href\x3d'#' class\x3d'oj-datepicker-current oj-priority-secondary "+(this.options.disabled?"oj-disabled' disabled":"oj-enabled'")+" data-handler\x3d'today' data-event\x3d'click keydown'\x3e"+
d+"\x3c/a\x3e";if(1<a.length){d=0;e=[{index:a.indexOf("today"),content:this.vK(b)?e:""}];for(e.sort(function(a,b){return a.index-b.index});d<e.length&&0>e[d].index;)d++;for(;d<e.length;)c+=e[d++].content;0<c.length&&(c="\x3cdiv class\x3d'oj-datepicker-buttonpane'\x3e"+c+"\x3c/div\x3e")}return c},fua:function(){var b,c,d=a.Na;b=["date","month","fullYear"];c=this.oc();var e,f,g=this.options.dayWide,h=this.options.dayNarrow,k=this.options.firstDayOfWeek,n,l,u,p,m,v,q,r,s,t="",S,F,R,V,Z,O,G,U,P,da=new Date,
da=new Date(da.getFullYear(),da.getMonth(),da.getDate()),X=this.Pg;e=this.options.datePicker.footerLayout;var T=this.IJ(),W=this.options.datePicker.currentMonthPos,ia=this.options.dayFormatter;P=null;var ga=1!==T[0]||1!==T[1];f=this.Ho("min");var ca;n=this.Ho("max");var aa,W=this.Pk-W,ba=this.Ml,fa=new Date(this.Wh,this.Mj,this.sq);l=this.en();var ha=d._dateTime(l,b,!0),oa=ha.fullYear,ta=ha.date,ha=ha.month,ua=new Date(oa,ha,ta),ma=this.options.disabled,xa=this.Dj(this.F("weekText"));f&&(f=c.parse(f),
ca=d._dateTime(f,b,!0));n&&(n=c.parse(n),aa=d._dateTime(n,b,!0));d._clearTime(l);0>W&&(W+=12,ba--);if(ca)for(b=new Date(ca.fullYear,ca.month,ca.date),aa&&0>c.we(n,f)&&(b=new Date(aa.fullYear,aa.month,aa.date));new Date(ba,W,this.gn(ba,W))<b;)W++,11<W&&(W=0,ba++);if(aa)for(b=new Date(aa.fullYear,aa.month-T[0]*T[1]+1,aa.date),ca&&0>c.we(n,f)&&(b=new Date(ca.fullYear,ca.month,ca.date));new Date(ba,W,1)>b;)W--,0>W&&(W=11,ba--);this.Pk=W;this.Ml=ba;c=this.b5(-1,ba,W)&&!ma;b=this.b5(1,ba,W)&&!ma;e=this.cD(e,
da);f=this.options.datePicker.weekDisplay;n=this.options.datePicker.daysOutsideMonth;l="";u="all";for(p=0;p<T[0];p++){m="";this.Xv=4;for(v=0;v<T[1];v++){u=0===p?"all":"";F="";if(ga){F+="\x3cdiv class\x3d'oj-datepicker-group";if(1<T[1])switch(v){case 0:F+=" oj-datepicker-group-first";u=0===p?X?"right":"left":"";break;case T[1]-1:F+=" oj-datepicker-group-last";u=0===p?X?"left":"right":"";break;default:F+=" oj-datepicker-group-middle",u=""}F+="'\x3e"}F+=this.dD(W,ba,u,c,b);F+="\x3ctable class\x3d'oj-datepicker-calendar"+
("number"===f?" oj-datepicker-weekdisplay":"")+(ma?" oj-disabled ":" oj-enabled oj-default ")+"' tabindex\x3d-1 data-handler\x3d'calendarKey' data-event\x3d'keydown' aria-readonly\x3d'true' role\x3d'grid' aria-labelledby\x3d'"+this.Rm(this.QB)+"'\x3e\x3cthead role\x3d'presentation'\x3e\x3ctr role\x3d'row'\x3e";R="number"===f?"\x3cth class\x3d'oj-datepicker-week-col'\x3e"+this.Dj(this.F("weekHeader"))+"\x3c/th\x3e":"";for(u=0;7>u;u++)V=(u+parseInt(k,10))%7,R+="\x3cth role\x3d'columnheader' aria-label\x3d'"+
g[V]+"'"+(5<=(u+k+6)%7?" class\x3d'oj-datepicker-week-end'":"")+"\x3e\x3cspan title\x3d'"+g[V]+"'\x3e"+h[V]+"\x3c/span\x3e\x3c/th\x3e";F+=R+"\x3c/tr\x3e\x3c/thead\x3e\x3ctbody role\x3d'presentation'\x3e";R=this.gn(ba,W);ba===oa&&W===ha&&(ta=Math.min(ta,R));u=(this.Vua(ba,W)-k+7)%7;R=Math.ceil((u+R)/7);this.Xv=R=ga?this.Xv>R?this.Xv:R:R;V=new Date(ba,W,1-u);for(Z=0;Z<R;Z++){F+="\x3ctr role\x3d'row'\x3e";u=this.oc().vt(d.dateToLocalIso(V));O="none"===f?"":"\x3ctd class\x3d'oj-datepicker-week-col' role\x3d'rowheader' aria-label\x3d'"+
xa+" "+u+"'\x3e"+u+"\x3c/td\x3e";for(u=0;7>u;u++){U=V.getMonth()!==W;q=V.getTime()===ua.getTime();r="oj-dp-"+this.uuid+"-"+Z+"-"+u+"-"+p+"-"+v;(s=V.getTime()===fa.getTime()&&W===this.Mj)?(t=r,S=" "+this.Vx):S="";G=[!0,""];P=V.getFullYear();var ea=V.getMonth(),Aa=V.getDate();ia&&(P=ia({fullYear:P,month:ea+1,date:Aa}))&&(G=[!P.disabled,P.className||""],P.tooltip&&G.push(P.tooltip));ea=V.getTime()===ua.getTime();P=U&&"selectable"!==n||!G[0]||this.bBa(V,ca,aa);O+="\x3ctd role\x3d'gridcell' aria-disabled\x3d'"+
!!P+"' aria-selected\x3d'"+q+"' id\x3d'"+r+"' class\x3d'"+(5<=(u+k+6)%7?" oj-datepicker-week-end":"")+(U?" oj-datepicker-other-month":"")+S+(P||ma?" "+this.UH+" oj-disabled":" oj-enabled ")+(U&&"hidden"===n?"":" "+G[1]+(q?" "+this.PP:"")+(V.getTime()===da.getTime()?" oj-datepicker-today":""))+"'"+(U&&"hidden"===n||!G[2]?"":" title\x3d'"+G[2].replace(/'/g,"\x26#39;")+"'")+(P?"":" data-handler\x3d'selectDay' data-event\x3d'click' data-month\x3d'"+V.getMonth()+"' data-year\x3d'"+V.getFullYear()+"'")+
"\x3e"+(U&&"hidden"===n?"\x26#xa0;":P||ma?"\x3cspan class\x3d'oj-disabled'\x3e"+V.getDate()+"\x3c/span\x3e":"\x3ca role\x3d'button' class\x3d'oj-enabled"+(ea?" oj-selected":"")+(U?" oj-priority-secondary":"")+"' "+(s?"":"tabindex\x3d'-1' ")+" href\x3d'#'\x3e"+V.getDate()+"\x3c/a\x3e")+"\x3c/td\x3e";V.setDate(V.getDate()+1)}F+=O+"\x3c/tr\x3e"}W++;11<W&&(W=0,ba++);F+="\x3c/tbody\x3e\x3c/table\x3e"+(ga?"\x3c/div\x3e"+(0<T[0]&&v===T[1]-1?"\x3cdiv class\x3d'oj-datepicker-row-break'\x3e\x3c/div\x3e":""):
"");m+=F}l+=m}return{html:l+e,vM:t}},hua:function(b,c){var d=this.options.datePicker.changeMonth,e=this.options.datePicker.changeYear,f=a.$a.Tha()?"before":"after",g="\x3cdiv class\x3d'oj-datepicker-title' role\x3d'header'\x3e",h="",k=a.Na,n=this.options.monthWide,l=this.options.disabled;n&&(h="none"===d?h+("\x3cspan class\x3d'oj-datepicker-month'\x3e"+n[b]+"\x3c/span\x3e"):h+("\x3ca role\x3d'button' href\x3d'#' data-handler\x3d'selectMonthHeader' data-event\x3d'click keydown' class\x3d'oj-datepicker-month "+
(l?"oj-disabled' disabled":"oj-enabled'")+"\x3e")+(n[b]+"\x3c/a\x3e"),"before"===f&&(g+=h+("select"!==d||"select"!==e?"\x26#xa0;":"")));this.Pka||(this.Pka="","none"===e?g+="\x3cspan class\x3d'oj-datepicker-year'\x3e"+v.format(k.dateToLocalIso(new Date(c,b,1)))+"\x3c/span\x3e":(g=g+("\x3ca role\x3d'button' href\x3d'#' data-handler\x3d'selectYearHeader' data-event\x3d'click keydown' class\x3d'oj-datepicker-year "+(l?"oj-disabled' disabled":"oj-enabled'")+"\x3e")+(v.format(k.dateToLocalIso(new Date(c,
b,1)))+"\x3c/a\x3e"),this.Pka=null));n&&"after"===f&&(g+=("select"!==d||"select"!==e?"\x26#xa0;":"")+h);g+="\x3cspan class\x3d'oj-helper-hidden-accessible' id\x3d'"+this.Rm(this.QB)+"'\x3e";g+=(n?n[b]+" ":"")+v.format(k.dateToLocalIso(new Date(c,b,1)))+"\x3c/span\x3e";g+="\x3cspan class\x3d'oj-helper-hidden-accessible' id\x3d'"+this.Rm(this.S1)+"'\x3e"+this.Dj(this.F("datePicker"))+"\x3c/span\x3e";return g+="\x3c/div\x3e"},h4:function(a,b){var c=this.Ml+("Y"===b?a:0),d=this.Pk+("M"===b?a:0),e=Math.min(this.sq,
this.gn(c,d))+("D"===b?a:0),c=new Date(c,d,e);this.sq=c.getDate();this.Pk=this.Mj=c.getMonth();this.Ml=this.Wh=c.getFullYear()},gua:function(){var b,c,d;b=a.Na;var e=["date","month","fullYear"];c=this.oc();var f,g=this.options.monthAbbreviated,h,k,n,l,u,p="",m,v,q=new Date;f=new Date(q.getFullYear(),q.getMonth(),q.getDate());h=this.options.datePicker.footerLayout;d=this.Ho("min");var r;m=this.Ho("max");var s;k=this.Pk;var q=this.Ml,t=this.en(),S=b._dateTime(t,e,!0);n=S.fullYear;l=S.date;u=S.month;
var S=new Date(n,u,l),F=this.options.disabled;d&&(d=c.parse(d),r=b._dateTime(d,e,!0));m&&(m=c.parse(m),s=b._dateTime(m,e,!0));b._clearTime(t);0>k&&(k+=12,q--);if(r)for(b=new Date(r.fullYear,r.month,r.date),s&&0>c.we(m,d)&&(b=new Date(s.fullYear,s.month,s.date));new Date(q,k,this.gn(q,k))<b;)k++,11<k&&(k=0,q++);if(s)for(b=new Date(s.fullYear,s.month,s.date),r&&0>c.we(m,d)&&(b=new Date(r.fullYear,r.month,r.date));new Date(q,k,1)>b;)k--,0>k&&(k=11,q--);this.Pk=k;this.Ml=q;c=this.c5(-1,q)&&!F;d=this.c5(1,
q)&&!F;f=this.cD(h,f);h="";this.Xv=4;c=""+this.dD(k,q,"all",c,d);c+="\x3ctable class\x3d'oj-datepicker-calendar oj-datepicker-monthview"+(F?" oj-disabled ":" oj-enabled oj-default ")+"' tabindex\x3d-1 data-handler\x3d'calendarKey' data-event\x3d'keydown' aria-readonly\x3d'true' role\x3d'grid' aria-labelledby\x3d'"+this.Rm(this.QB)+"'\x3e";c+="\x3ctbody role\x3d'presentation'\x3e";d=this.gn(q,k);q===n&&k===u&&Math.min(l,d);m=new Date(q,0,1);for(b=0;4>b;b++){c+="\x3ctr role\x3d'row'\x3e";e="";for(k=
0;3>k;k++){t=3*b+k;n=m.getMonth()===S.getMonth();l="oj-dp-"+this.uuid+"-"+b+"-"+k+"-0-0";(u=t===this.Mj)?(p=l,d=" "+this.Vx):d="";var R=m.getMonth()===S.getMonth();v=s&&s.fullYear===q;v=!((!r||r.fullYear!==q||t>=r.month)&&(!v||t<=s.month));e+="\x3ctd role\x3d'gridcell' aria-disabled\x3d'"+!!v+"' aria-selected\x3d'"+n+"' id\x3d'"+l+"' class\x3d'"+d+(v||F?" "+this.UH+" oj-disabled":" oj-enabled ")+(n?" "+this.PP:"")+"'"+(v?"":" data-handler\x3d'selectMonth' data-event\x3d'click' data-month\x3d'"+m.getMonth()+
"' data-year\x3d'"+m.getFullYear()+"'")+"\x3e"+(v||F?"\x3cspan class\x3d'oj-disabled'\x3e"+g[t]+"\x3c/span\x3e":"\x3ca role\x3d'button' class\x3d'oj-enabled"+(R?" oj-selected":"")+"' "+(u?"":"tabindex\x3d'-1' ")+" href\x3d'#'\x3e"+g[t]+"\x3c/a\x3e")+"\x3c/td\x3e";m.setMonth(m.getMonth()+1)}c+=e+"\x3c/tr\x3e"}h+=c+"\x3c/tbody\x3e\x3c/table\x3e";return{html:h+f,vM:p}},iua:function(){var b,c,d,e=a.Na;b=["date","month","fullYear"];c=this.oc();var f,g,h,k,n,l,u="",p,m,q,r=new Date;f=new Date(r.getFullYear(),
r.getMonth(),r.getDate());g=this.options.datePicker.footerLayout;d=this.Ho("min");var s;m=this.Ho("max");r=this.Pk;k=this.Ml;var t=this.en(),L=e._dateTime(t,b,!0);n=L.fullYear;l=L.date;p=L.month;var L=new Date(n,p,l),S=this.options.disabled;d&&(d=c.parse(d),s=e._dateTime(d,b,!0));m&&(m=c.parse(m),h=e._dateTime(m,b,!0));e._clearTime(t);0>r&&(r+=12,k--);if(s)for(b=new Date(s.fullYear,s.month,s.date),h&&0>c.we(m,d)&&(b=new Date(h.fullYear,h.month,h.date));new Date(k,r,this.gn(k,r))<b;)r++,11<r&&(r=0,
k++);if(h)for(b=new Date(h.fullYear,h.month,h.date),s&&0>c.we(m,d)&&(b=new Date(s.fullYear,s.month,s.date));new Date(k,r,1)>b;)r--,0>r&&(r=11,k--);this.Pk=r;this.Ml=k;c=this.a5(-1,k)&&!S;d=this.a5(1,k)&&!S;f=this.cD(g,f);g="";this.Xv=4;c=""+this.dD(r,k,"all",c,d);c+="\x3ctable class\x3d'oj-datepicker-calendar oj-datepicker-yearview"+(S?" oj-disabled ":" oj-enabled oj-default ")+"' tabindex\x3d-1 data-handler\x3d'calendarKey' data-event\x3d'keydown' aria-readonly\x3d'true' role\x3d'grid' aria-labelledby\x3d'"+
this.Rm(this.QB)+"'\x3e";c+="\x3ctbody role\x3d'presentation'\x3e";d=this.gn(k,r);k===n&&r===p&&Math.min(l,d);s=this.ewa(k,s,h);t=10*Math.floor(k/10);d=new Date(t,r,1);for(m=0;4>m;m++){c+="\x3ctr role\x3d'row'\x3e";b="";for(h=0;3>h&&(3!=m||1!=h);h++){q=t+3*m+h;k=d.getFullYear()===L.getFullYear();n="oj-dp-"+this.uuid+"-"+m+"-"+h+"-0-0";(l=q===this.Wh)?(u=n,p=" "+this.Vx):p="";var F=d.getFullYear()===L.getFullYear(),R=v.format(e.dateToLocalIso(new Date(q,r,1)));q=q<s.startYear||q>s.endYear;b+="\x3ctd role\x3d'gridcell' aria-disabled\x3d'"+
!!q+"' aria-selected\x3d'"+k+"' id\x3d'"+n+"' class\x3d'"+p+(q||S?" "+this.UH+" oj-disabled":" oj-enabled ")+(k?" "+this.PP:"")+"'"+(q?"":" data-handler\x3d'selectYear' data-event\x3d'click' data-month\x3d'"+d.getMonth()+"' data-year\x3d'"+d.getFullYear()+"'")+"\x3e"+(q||S?"\x3cspan class\x3d'oj-disabled'\x3e"+R+"\x3c/span\x3e":"\x3ca role\x3d'button' class\x3d'oj-enabled"+(F?" oj-selected":"")+"' "+(l?"":"tabindex\x3d'-1' ")+" href\x3d'#'\x3e"+R+"\x3c/a\x3e")+"\x3c/td\x3e";d.setFullYear(d.getFullYear()+
1)}c+=b+"\x3c/tr\x3e"}g+=c+"\x3c/tbody\x3e\x3c/table\x3e";return{html:g+f,vM:u}},ewa:function(a,b,c){var d,e,f,g;d=this.options.datePicker.yearRange.split(":");e=(new Date).getFullYear();f=function(b){b=b.match(/c[+\-].*/)?a+parseInt(b.substring(1),10):b.match(/[+\-].*/)?e+parseInt(b,10):parseInt(b,10);return isNaN(b)?e:b};g=f(d[0]);d=Math.max(g,f(d[1]||""));g=b?Math.max(g,b.fullYear):g;d=c?Math.min(d,c.fullYear):d;return{startYear:g,endYear:d}},IJ:function(){var a=this.options.datePicker.numberOfMonths,
a="string"===typeof a?parseInt(a,10):a;return null==a?[1,1]:"number"===typeof a?[1,a]:a},gn:function(a,b){return 32-(new Date(a,b,32)).getDate()},Vua:function(a,b){return(new Date(a,b,1)).getDay()},b5:function(a,b,c){var d=this.IJ();b=new Date(b,c+(0>a?a:d[0]*d[1]),1);0>a&&b.setDate(this.gn(b.getFullYear(),b.getMonth()));return this.vK(b)},c5:function(a,b){var c;0>a?(c=new Date(b+a,12,1),c.setDate(this.gn(c.getFullYear(),c.getMonth()))):c=new Date(b+a,1,1);return this.vK(c)},a5:function(a,b){var c;
c=10*Math.floor(b/10);0>a?(c=new Date(c+9+10*a,12,1),c.setDate(this.gn(c.getFullYear(),c.getMonth()))):c=new Date(c+10*a,1,1);return this.vK(c)},bBa:function(a,b,c){b=b?new Date(b.fullYear,b.month,b.date):null;c=c?new Date(c.fullYear,c.month,c.date):null;return null!==b&&a<b||null!==c&&a>c},vK:function(b){var c,d,e=a.Na,f=this.oc(),g,h,k=this.Ho("min"),n=null,l=this.Ho("max"),u=null;if(c=this.options.datePicker.yearRange)c=c.split(":"),d=(new Date).getFullYear(),n=parseInt(c[0],10),u=parseInt(c[1],
10),c[0].match(/[+\-].*/)&&(n+=d),c[1].match(/[+\-].*/)&&(u+=d);k&&(k=f.parse(k),g=e._dateTime(k,["fullYear","month","date"],!0),g=new Date(g.fullYear,g.month,g.date));l&&(l=f.parse(l),e=e._dateTime(l,["fullYear","month","date"],!0),h=new Date(e.fullYear,e.month,e.date));return(!g||b.getTime()>=g.getTime())&&(!h||b.getTime()<=h.getTime())&&(!n||b.getFullYear()>=n)&&(!u||b.getFullYear()<=u)},gT:function(){return this.Dj(this.F("tooltipCalendar"+(this.options.disabled?"Disabled":"")))},y6:function(a){this.xf&&
(f(this.xf.children(),a),this.xf.find("."+this.TQ).attr("title",this.gT()));a&&this._hide(this.Eg);this.bf&&this.li()},IP:function(){this.bf||this._superApply(arguments)},LV:function(a){this.bf||this._superApply(arguments)},OK:function(a){if(!this.bf){this._superApply(arguments);var b=g.ui.keyCode,c=!1;if(this.Ok())switch(a.keyCode){case b.TAB:this._hide(this.AH);break;case b.ESCAPE:this._hide(this.ds);c=!0;break;case b.UP:case b.DOWN:this.Qc.find(".oj-datepicker-calendar").focus(),c=!0}else switch(a.keyCode){case b.UP:case b.DOWN:this.wc(this.Si(),
a),this.show(),c=!0}if(c)return a.preventDefault(),a.stopPropagation(),!1}},Hl:function(a){this.bf||this._superApply(arguments);this.pL(this.en());this.Ok()&&this.li(!(this.bf&&this.wf&&this.wf[0]===document.activeElement))},oc:function(){return this.options.converter?this._superApply(arguments):g.oj.ojInputDate.prototype.options.converter},Zx:function(){return this.options.value||""},_GetDefaultStyleClass:function(){return"oj-inputdate"},WB:function(){var b=this._superApply(arguments);if(null!=this.options.min||
null!=this.options.max)this.RC[a.Ve.VALIDATOR_TYPE_DATETIMERANGE]=this.ZJ("min");null!=this.options.dayFormatter&&(this.RC[a.Ve.VALIDATOR_TYPE_DATERESTRICTION]=this.ZJ("dayFormatter"));return g.extend(this.RC,b)},Gj:function(){this._hide(this.Eg);this._superApply(arguments)},Vm:function(){this._hide(this.Eg);this._superApply(arguments)},ZJ:function(b){var c=null;"min"===b||"max"===b?c=e(this.options,this.oc()):"dayFormatter"===b&&(b={dayFormatter:this.options.dayFormatter,converter:this.oc()},g.extend(b,
this.options.translations.dateRestriction||{}),c=a.za.sx(a.Ve.VALIDATOR_TYPE_DATERESTRICTION).createValidator(b));return c},Xva:function(){var a=new Date;a.setHours(0);a.setMinutes(0);a.setSeconds(0);a.setMilliseconds(0);return a},en:function(){return this.options.value||this.L7()},getNodeBySubId:function(a){var b=null,c=a&&a.subId,d=this.Qc;if(c)switch(c){case "oj-datepicker-content":b=d[0];break;case "oj-inputdatetime-calendar-icon":b=g(".oj-inputdatetime-calendar-icon",this.xf)[0];break;case "oj-datepicker-prev-icon":b=
g(".oj-datepicker-prev-icon",d)[0];break;case "oj-datepicker-next-icon":b=g(".oj-datepicker-next-icon",d)[0];break;case "oj-datepicker-month":b=g(".oj-datepicker-month",d)[0];break;case "oj-datepicker-year":b=g(".oj-datepicker-year",d)[0];break;case "oj-datepicker-current":b=g(".oj-datepicker-current",d)[0];break;case "oj-inputdatetime-date-input":b=this.bf?null:this.element[0];break;default:b=null}return b||this._superApply(arguments)},getSubIdByNode:function(a){var b=this.Qc,c=null,d=[{selector:".oj-inputdatetime-calendar-icon",
ele:this.xf},{selector:".oj-datepicker-prev-icon",ele:b},{selector:".oj-datepicker-next-icon",ele:b},{selector:".oj-datepicker-month",ele:b},{selector:".oj-datepicker-year",ele:b},{selector:".oj-datepicker-current",ele:b}];if(a===b[0])return"oj-datepicker-content";if(!this.bf&&a===this.element[0])return"oj-inputdatetime-date-input";for(var b=0,e=d.length;b<e;b++){var f=d[b],h=g(f.selector,f.ele);if(1===h.length&&h[0]===a){c=f.selector.substr(1);break}}return c||this._superApply(arguments)},hide:function(){return this._hide(this.Eg)},
_hide:function(a){m(this)||!this.Ok()||this.bf||(this.SK.ojPopup("close"),this.Vo(a));return this},Vo:function(){this.PD&&"focus"===this.options.datePicker.showOn?this.Sl.focus():("focus"===this.options.datePicker.showOn&&(this.qn=!0),this.element.focus())},refresh:function(){this.xf&&this.xf.find("."+this.TQ).attr("title",this.gT());return this._superApply(arguments)||this},show:function(){if(!(this.Ok()||this.options.disabled||this.options.readOnly))if(this.qn)this.qn=!1;else{if(m(this)){this.element.blur();
var a={};a.date=c(this.v8(),this.en());a.mode="date";return this.m3(a)}return this.AEa()}},v8:function(){if(null===this.LK){var b=this.oc().resolvedOptions(),c={};g.extend(c,b,{isoStrFormat:"offset"});this.LK=a.za.dj(a.Hi.CONVERTER_TYPE_DATETIME).createConverter(c)}return this.LK},m3:function(b){var d=this.Ho("min"),e=this.Ho("max"),f=this.v8();d&&(b.minDate=c(f,d).valueOf());e&&(b.maxDate=c(f,d).valueOf());var h=this;h.Uo=!0;window.datePicker.show(b,g.proxy(this.U2,this),function(b){h.Uo=!1;b.startsWith("cancel")?
h.Vo(h.ds):a.t.log("Error: native date or time picker failed: "+b)})},U2:function(b){this.Uo=!1;b&&(b=a.Na._dateTime(this.en(),{month:b.getMonth(),date:b.getDate(),fullYear:b.getFullYear()}),b=this.oc().format(b),this.wc(b,{}));this.Vo(this.fs)},AEa:function(){var b=this.Pg;this.Qc.empty();this.li();b=a.Ed.ml({my:"start top",at:"start bottom",of:this.element,collision:"flipfit flipfit"},b);this.SK.ojPopup("open",this.element.parent(),b);return this}});a.Components.Wn({ojInputDate:{firstDayOfWeek:a.Components.Ne(function(){return a.$a.uF()}),
dayWide:a.Components.Ne(function(){return a.$a.rF("wide")}),dayNarrow:a.Components.Ne(function(){return a.$a.rF("narrow")}),monthWide:a.Components.Ne(function(){return a.$a.wF("wide")}),monthAbbreviated:a.Components.Ne(function(){return a.$a.wF("abbreviated")}),datePicker:a.Components.Ne(function(){return(a.Wc.De("oj-inputdatetime-option-defaults")||{}).datePicker}),renderMode:a.Components.Ne(function(){return(a.Wc.De("oj-inputdatetime-option-defaults")||{}).renderMode}),keyboardEdit:a.Components.Ne(function(){return(a.Wc.De("oj-inputdatetime-option-defaults")||
{}).keyboardEdit})}});a.Ra("oj.ojInputTime",g.oj.inputBase,{version:"1.0.0",widgetEventPrefix:"oj",_CLASS_NAMES:"oj-inputdatetime-input",_WIDGET_CLASS_NAMES:"oj-inputdatetime-time-only oj-component oj-inputdatetime",aQ:"oj-inputdatetime-input-container",_ELEMENT_TRIGGER_WRAPPER_CLASS_NAMES:"",_INPUT_HELPER_KEY:"inputHelp",_ATTR_CHECK:[{attr:"type",setMandatory:"text"}],_GET_INIT_OPTIONS_PROPS:[{ha:"disabled",Sd:!0},{ha:"pattern"},{ha:"title"},{ha:"placeholder"},{ha:"value",wh:d},{ha:"required",wh:!0,
Sd:!0},{ha:"readonly",option:"readOnly",Sd:!0},{ha:"min",wh:d},{ha:"max",wh:d}],B3:"ojInputTime",UQ:"oj-inputdatetime-input-trigger",VQ:"oj-inputdatetime-time-icon",fs:"selection",ds:"cancelled",AH:"tab",Eg:"close",lna:"enabled",eQ:"disabled",options:{converter:a.za.dj(a.Hi.CONVERTER_TYPE_DATETIME).createConverter({hour:"2-digit",hour12:!0,minute:"2-digit"}),keyboardEdit:"enabled",max:void 0,min:void 0,datePickerComp:null,pickerAttributes:null,renderMode:"jet",timePicker:{footerLayout:"",timeIncrement:"00:30:00:00",
showOn:"focus"}},Yf:function(b,c){this._super(b,c);null===this.options.datePickerComp&&a.Fe.Cp(this._GET_INIT_OPTIONS_PROPS,c,this)},So:function(){return a.fa.temporarilyEnableWheelStyleTimePickerForJet22},sH:function(){this.fX={};this.Xh=this.options.datePickerComp;this.Sl=null;this.Uo=this.qn=this.PD=this.ew=!1;this.FL=null;var b=this.options.pickerAttributes,c=this;this.So()?(this.Zk=g("\x3cdiv id\x3d'"+this.Rm(this.B3)+"' class\x3d'oj-timepicker-content' style\x3d'display:none'\x3e\x3c/div\x3e"),
g("body").append(this.Zk),this.UK=this.Zk.ojPopup({initialFocus:"none",rootAttributes:{"class":"oj-timepicker-popup"},chrome:"default",modality:"modeless",open:function(){},beforeClose:function(){}}),b&&a.Fe.nO(this.UK.ojPopup("widget"),b)):(this.ef=g("\x3cdiv id\x3d'"+this.Rm(this.B3)+"' class\x3d'oj-listbox-drop' style\x3d'display:none'\x3e\x3c/div\x3e"),g("body").append(this.ef),this.TK=this.ef.ojPopup({initialFocus:"none",rootAttributes:{"class":"datetimepicker-dropdown"},chrome:"none",modality:"modeless",
open:function(){var a=g("[aria-selected]",c.ef);1===a.length&&c.SR(a.parent(),!0);"image"!==c.options.timePicker.showOn&&c.Tk()||g("ul",c.ef).focus()},beforeClose:function(){c.kea=g("ul",c.ef).scrollTop()}}),b&&a.Fe.nO(this.TK.ojPopup("widget"),b));this.Tk()&&(this._ELEMENT_TRIGGER_WRAPPER_CLASS_NAMES+=this.aQ)},nt:function(){return(this.So()?this.UK.ojPopup("isOpen"):this.TK.ojPopup("isOpen"))||this.Uo},_ComponentCreate:function(){this.sH();var a=this._superApply(arguments);if(this.Uj()&&!this.J$())this._CLASS_NAMES=
"";else{if(this.options.value){var b=this.oc().format(this.options.value);this.wc(b,{})}l(this)}this.dw();this.kR();return a},Nh:function(){var a=this._superApply(arguments);f(this.xf.children(),this.options.disabled);return a},_setOption:function(b,c,d){var g=null,h;if("value"===b)return c||(c=null),g=this._super(b,c,d),this.So()?this.FI():this.iJ(),g;"timePicker"===b&&this.So()&&void 0===c.footerLayout&&(h=this.options.timePicker.footerLayout);g=this._superApply(arguments);h&&(this.options.timePicker.footerLayout=
h);"disabled"===b?(c&&this._hide(this.Eg),this.xf.find("."+this.VQ).attr("title",this.bU()),f(this.xf.children(),c)):"max"!==b&&"min"!==b||this.Uj()?"readOnly"===b?(this.dw(),c&&this._hide(this.Eg)):"keyboardEdit"===b?this.dw():"converter"===b&&(this.FL=null):(this.fX[a.Ve.VALIDATOR_TYPE_DATETIMERANGE]=e(this.options,this.oc()),this.Px());b in{max:!0,min:!0,converter:!0,timePicker:!0}&&(this.So()?this.FI():this.iJ());return g},_destroy:function(){var a=this._super();this.Tk()&&(this.element.off("focus touchstart"),
this.bk.off("touchstart"));this.xf&&this.xf.remove();this.ef&&this.ef.remove();this.Zk&&this.Zk.remove();return a},dw:function(){this.element.prop("readOnly",!(!this.options.readOnly&&!this.hV()))},hV:function(){return this.options.keyboardEdit===this.eQ},IP:function(){this.Tk()&&this._superApply(arguments)},OK:function(a){if(this.Tk()){this._superApply(arguments);var b=g.ui.keyCode,c=!1;if(this.nt())switch(a.keyCode){case b.TAB:this._hide(this.AH);break;case b.ESCAPE:this._hide(this.ds);c=!0;break;
case b.UP:case b.DOWN:this.So()?this.Zk.focus():g("ul",this.ef).focus(),c=!0}else switch(a.keyCode){case b.UP:case b.DOWN:this.wc(this.Si(),a),this.show(),c=!0}if(c||a.keyCode===b.ENTER)return a.preventDefault(),a.stopPropagation(),!1}},bU:function(){return this.Dj(this.F("tooltipTime"+(this.options.disabled?"Disabled":"")))},ZQ:function(){this.Sl=this._superApply(arguments);this.Sl.attr({role:"combobox","aria-haspopup":"true",tabindex:"-1"})},MV:function(){var a=this.options.timePicker.showOn;this.ew?
(this.ew=!1,this.Sl.focus()):"focus"===a?this.show():this.nt()&&this._hide(this.Eg)},EH:function(){if("focus"===this.options.timePicker.showOn)if(this.nt())this.qn=!0,this._hide(this.Eg);else{var a=this.element[0]===document.activeElement;this.show();this.ew=!0;a&&this.Sl.focus()}},kR:function(){var a=this.options.timePicker.showOn,b=this.Tk(),c=b?g("\x3cspan\x3e").addClass(this.UQ):g("+ span",this.element),d=g("\x3cspan title\x3d'"+this.bU()+"'/\x3e").addClass(this.VQ+" oj-clickable-icon-nocontext oj-component-icon"),
e=this;b&&(this.element.on("focus",g.proxy(this.MV,this)),this.element.on("touchstart",g.proxy(this.EH,this)));(this.Tk()?this.bk:this.Xh.widget.bk).on("touchstart",function(){e.PD=!0});"image"===a&&(d.css("display","block"),this.Pg?(this.element.css("border-top-left-radius",0),this.element.css("border-bottom-left-radius",0)):(this.element.css("border-top-right-radius",0),this.element.css("border-bottom-right-radius",0)));if(b||!m(this))c.append(d),d.on("click",function(){e.nt()?e._hide(e.Eg):(e.show(),
g("ul",e.ef).focus())}),this.We(d),this.Gk(d);this.xf=c;b&&this.element.after(c)},QAa:function(a,b,c){var d=this.oc();return b&&0>d.we(a,b)||c&&0<d.we(a,c)},Zh:function(){return this.Uj()?this.Xh.widget.dha():this.options.value},iJ:function(){var b=this.Zh(),c,d=this.oc(),e=g("\x3cul class\x3d'oj-listbox-results' tabindex\x3d'-1' role\x3d'listbox'\x3e\x3c/ul\x3e"),f=b?d.format(b):"";c=[];b?this.Uj()||(b=d.parse(f)):(c=new Date,c.setHours(0),c.setMinutes(0),c.setSeconds(0),c.setMilliseconds(0),b=a.Na.dateToLocalIso(c));
c=this.Wva(b);f=f||c[0].value;this.ef.empty();b=0;for(d=c.length;b<d;b++){var h=c[b].value,k=c[b].minMaxRange,n=g("\x3cli class\x3d'oj-listbox-result "+(k?"oj-disabled":"")+"' role\x3d'presentation'\x3e"),l=this.uuid+"_sel"+b,k=g("\x3cdiv class\x3d'oj-listbox-result-label' "+(k?"aria-disabled ":"")+"data-value\x3d'"+h+"' role\x3d'option' id\x3d'"+l+"'\x3e"+c[b].label+"\x3c/li\x3e");f===h&&(k.attr("aria-selected","true"),n.addClass("oj-hover"),e.attr("aria-activedescendant",l));n.append(k);e.append(n)}this.ef.append(e);
g(".oj-listbox-result",e).on("mousemove",function(){var a=g(this);a.hasClass("oj-disabled")||(g(".oj-hover",e).removeClass("oj-hover"),a.addClass("oj-hover"),e.attr("aria-activedescendant",a.children()[0].id))});var u=this;e.on("click",function(a){var b=g(a.target);b.hasClass("oj-disabled")||void 0!==b.attr("aria-disabled")||u.xba(a)}).on("keydown",function(a){u.dFa(a)});g("ul",this.ef).one("focus",function(){var a=g("[aria-selected]",u.ef);1===a.length&&u.SR(g(a))})},b9:function(){null===this.FL&&
(this.FL=t(this.oc(),{isoStrFormat:"offset"}));return this.FL},Wva:function(b){var c=[],d=this.oc(),e=a.Na,f="",f=this.Uj(),g=new Date,h=f?this.Xh.widget.options.min:this.options.min,k=f?this.Xh.widget.options.max:this.options.max,n=r(this.options.timePicker.timeIncrement),h=h?e._minMaxIsoString(h,this.Zh()):h,k=k?e._minMaxIsoString(k,this.Zh()):k;g.setDate(1);g.setHours(0);g.setMinutes(0);g.setSeconds(0);g.setMilliseconds(0);var l=new Date(g);l.setDate(2);b=this.b9().parse(b);b=e._clearTime(b);do f=
this.Dj(d.format(b)),c.push({label:f,value:f,minMaxRange:this.QAa(b,h,k)}),g.setHours(g.getHours()+n.hN),g.setMinutes(g.getMinutes()+n.WN),g.setSeconds(g.getSeconds()+n.qLa),g.setMilliseconds(g.getMilliseconds()+n.jKa),b=e._dateTime(b,{hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()});while(g.getDate()!==l.getDate());return c},dFa:function(a){if(this.nt()){var b=g.ui.keyCode,c=!1;switch(a.keyCode){case b.TAB:this._hide(this.AH);break;case b.ESCAPE:this._hide(this.ds);
c=!0;break;case b.UP:this.rba(a,"prev");c=!0;break;case b.DOWN:this.rba(a,"next");c=!0;break;case b.ENTER:this.xba(a),c=!0}if(c)return a.preventDefault(),a.stopPropagation(),!1}},rba:function(a,b){var c=g(".oj-hover",this.ef),d=g("ul",this.ef),e=null;1===c.length?(e=c[b](),1===e.length&&c.removeClass("oj-hover")):e=g(d.children()[0]);e&&1===e.length&&(e.addClass("oj-hover"),d.attr("aria-activedescendant",e.children()[0].id),this.SR(e))},xba:function(a){var b=this.ef,c=g("[aria-selected]",b),d=g("ul",
b),b=g(".oj-hover div",b);1===b.length&&(1===c.length&&(c.removeAttr("aria-selected"),c.parent().removeClass("oj-hover")),b.attr("aria-selected","true"),b.parent().addClass("oj-hover"),this._hide(this.fs),this.Hl(b.attr("data-value")),this.wc(b.attr("data-value"),a),d.attr("aria-activedescendant",b[0].id),this.Uj()&&this.Xh.widget._hide(this.fs))},LV:function(a){this.Tk()&&this._superApply(arguments)},show:function(){if(!(this.nt()||this.options.disabled||this.options.readOnly))if(this.qn)this.qn=
!1;else return m(this)?(this.element.blur(),this.EEa()):this.So()?this.JEa():this.BEa()},EEa:function(){var b={},d=this.b9(),e=c(d,this.Zh());b.date=e;b.mode="time";e=r(this.options.timePicker.timeIncrement);b.minuteInterval=0===e.hN?e.WN:1;var f=this.Uj()?this.Xh.widget.options.min:this.options.min,e=this.Uj()?this.Xh.widget.options.max:this.options.max;f&&(f=c(d,a.Na._minMaxIsoString(f,this.Zh())),b.minDate=f.valueOf());e&&(d=c(d,a.Na._minMaxIsoString(e,this.Zh())),b.maxDate=d.valueOf());var g=
this;this.Uo=!0;window.datePicker.show(b,function(b){g.Uo=!1;b&&(b=a.Na._dateTime(g.Zh(),{hours:b.getHours(),minutes:b.getMinutes(),seconds:b.getSeconds()}),b=g.oc().format(b),g.wc(b,{}));g.Vo(g.fs)},function(b){g.Uo=!1;b.startsWith("cancel")?g.Vo(g.ds):a.t.log("Error: native time picker failed: "+b)})},BEa:function(){this.Uj()&&this.Xh.widget._hide(this.Eg);this.iJ();var b=this.ef,c=this.TK;b.width(this.element.parent().width());b.css({position:"relative"});var d=a.Ed.ml({my:"start top",at:"start bottom",
of:this.element,collision:"flipfit flipfit"},this.Pg);c.ojPopup("open",this.element.parent(),d);b.find("[aria-selected]").parent().addClass("oj-hover")},hide:function(){return this._hide(this.Eg)},_hide:function(a){!m(this)&&this.nt()&&(this.So()?this.UK.ojPopup("close"):this.TK.ojPopup("close"),this.Vo(a));return this},Vo:function(){this.PD&&"focus"===this.options.timePicker.showOn?(this.Tk()?this.Sl:this.Xh.widget.Sl).focus():("focus"===this.options.timePicker.showOn&&(this.Tk()?this.qn=!0:this.Xh.widget.qn=
!0),this.element.focus())},refresh:function(){this.xf&&this.xf.find("."+this.VQ).attr("title",this.bU());return this._superApply(arguments)||this},Hl:function(a){this.Tk()&&this._superApply(arguments);this.nt()&&(this.So()?this.FI():this.iJ())},wc:function(b,c,d){if(this.Uj()){this._super(b,null,d);try{var e=this.oc(),f=e.parse(b),g=a.Na,h=this.Xh.widget,k=h.dha()||g.dateToLocalIso(new Date);if(!f||0!==e.we(k,f)){var n=g._copyTimeOver(f||g.dateToLocalIso(new Date),k);h.VLa(n,c)}}catch(l){}}else this._superApply(arguments)},
UB:function(){return this.Tk()},Tk:function(){return!this.Uj()||this.J$()},_GetDefaultStyleClass:function(){return"oj-inputtime"},Zx:function(){return this.options.value||""},WB:function(){var b=this._superApply(arguments);null==this.options.min&&null==this.options.max||this.Uj()||(this.fX[a.Ve.VALIDATOR_TYPE_DATETIMERANGE]=e(this.options,this.oc()));return g.extend(this.fX,b)},oc:function(){return this.options.converter?this._superApply(arguments):g.oj.ojInputTime.prototype.options.converter},SR:function(a,
b){var c=a.parent();b&&this.kea&&g(c).scrollTop(this.kea);var d=g(c).scrollTop(),e=d+g(c).height(),f=a[0].offsetTop,h=f+g(a).height();f<d?g(c).scrollTop(f):h>e&&g(c).scrollTop(h-g(c).height())},Uj:function(){return null!==this.Xh},J$:function(){return this.Xh.inline},Gj:function(){this._hide(this.Eg);this._superApply(arguments)},Vm:function(){this._hide(this.Eg);this._superApply(arguments)},AMa:function(a){return a?g.contains((this.So()?this.Zk:this.ef)[0],a):!1},dD:function(){var a=this.Dj(this.F("cancelText")),
a="\x3ca role\x3d'button' href\x3d'#' class\x3d'oj-enabled oj-default oj-timepicker-cancel-button' title\x3d'"+a+"'\x3e"+a+"\x3c/a\x3e",b=this.Dj(this.F("okText")),c="\x3cdiv class\x3d'oj-timepicker-header"+(this.options.disabled?" oj-disabled ":" oj-enabled oj-default ")+"'\x3e",c=c+a+("\x3ca role\x3d'button' href\x3d'#' class\x3d'oj-enabled oj-default oj-timepicker-ok-button' title\x3d'"+b+"'\x3e"+b+"\x3c/a\x3e");return c+="\x3c/div\x3e"},cD:function(a,b){var c="",d="\x3ca role\x3d'button' href\x3d'#' class\x3d'oj-timepicker-now oj-priority-secondary oj-enabled'\x3e"+
this.Dj(this.F("currentTimeText"))+"\x3c/a\x3e";if(a&&1<a.length){var e=0,d=[{index:a.indexOf("now"),content:b?d:""}];for(d.sort(function(a,b){return a.index-b.index});e<d.length&&0>d[e].index;)e++;for(;e<d.length;)c+=d[e++].content;0<c.length&&(c="\x3cdiv class\x3d'oj-timepicker-footer'\x3e"+c+"\x3c/div\x3e")}return c},e8:function(b,c,d){b=(c=(c=(c=this.Uj()?this.Xh.widget.options[c]:this.options[c])?a.Na._minMaxIsoString(c,this.Zh()):c)?b.parse(c):c)?a.Na._clearTime(c):null;d&&b&&d.substring(0,
d.indexOf("T"))!==b.substring(0,b.indexOf("T"))&&(c=null);return c},eva:function(b){var c=this.Zh();c||(c=new Date,c.setHours(0),c.setMinutes(0),c.setSeconds(0),c.setMilliseconds(0),c=a.Na.dateToLocalIso(c));return c=b.parse(c)},kua:function(){var b=a.za.dj(a.Hi.CONVERTER_TYPE_DATETIME).createConverter({pattern:"a"});return[b.format("2016-01-01T01:00:00Z"),b.format("2016-01-01T13:00:00Z")]},FI:function(){var b=this.Zk;b.empty();var c=this.oc(),d=c.resolvedOptions();"zulu"===d.yZ&&(d.yZ="offset",c=
a.za.dj(a.Hi.CONVERTER_TYPE_DATETIME).createConverter(d),d=c.resolvedOptions());var e=a.Na,f=this.Zh(),h=new Date;f||(f=a.Na.dateToLocalIso(h));var f=c.parse(f),f=e._clearTime(f),e=this.e8(c,"min",f),f=this.e8(c,"max",f),k=this.options.timePicker.footerLayout,l=this.lea=new p;(d=d.pattern||d.patternFromOptions)&&(l.format=d);l.ampmStrings=this.kua();if(d=this.options.timePicker.timeIncrement)d=r(d),l.increment=60*d.hN+d.WN;l.isoValue=this.eva(c);e&&(l.isoMin=e);f&&(l.isoMax=f);b.append(g(this.dD(b)));
this.Kea=g(n(l));b.append(this.Kea);b.append(g(this.cD(k,h)));b.find(".oj-timepicker-hour").attr("aria-label",this.F("hourWheelLabel"));b.find(".oj-timepicker-minute").attr("aria-label",this.F("minuteWheelLabel"));b.find(".oj-timepicker-meridian").attr("aria-label",this.F("ampmWheelLabel"));this.Zk.append(b)},JEa:function(){this.Uj()&&this.Xh.widget.hide();var b=this,c=this.UK;this.FI();this.Zk.find(".oj-timepicker-cancel-button").on("click",function(a){a.preventDefault();c.ojPopup("close");b.Vo(b.ds)});
this.Zk.find(".oj-timepicker-ok-button").on("click",function(a){b.wc(b.lea.isoValue,a);a.preventDefault();c.ojPopup("close");b.Vo(b.fs)});this.Zk.find(".oj-timepicker-now").on("click",function(c){var d=a.Na.dateToLocalIso(new Date),d=b.oc().parse(d);b.lea.isoValue=d;c.preventDefault()});var d=a.Ed.ml({my:"start top",at:"start bottom",of:this.element,collision:"flipfit flipfit"},this.Pg);c.ojPopup("open",this.element.parent(),d);this.Kea.children().first().focus()},getNodeBySubId:function(a){var b=
null,c=a&&a.subId,d=this.Zk;if(c)switch(c){case "oj-listbox-drop":b=this.ef?this.ef[0]:null;break;case "oj-inputdatetime-time-icon":b=g(".oj-inputdatetime-time-icon",this.xf)[0];break;case "oj-inputdatetime-time-input":b=this.element[0];break;case "oj-timepicker-content":b=d?d[0]:null;break;case "oj-timepicker-cancel-button":b=g(".oj-timepicker-cancel-button",d)[0];break;case "oj-timepicker-ok-button":b=g(".oj-timepicker-ok-button",d)[0];break;case "oj-timepicker-hour":b=g(".oj-timepicker-hour",d)[0];
break;case "oj-timepicker-minute":b=g(".oj-timepicker-minute",d)[0];break;case "oj-timepicker-meridian":b=g(".oj-timepicker-meridian",d)[0];break;case "oj-timepicker-now":b=g(".oj-timepicker-now",d)[0];break;default:b=null}return b||this._superApply(arguments)},getSubIdByNode:function(a){var b=g(".oj-inputdatetime-time-icon",this.xf),c=null,d=this.Zk,e=[{selector:".oj-timepicker-cancel-button",ele:d},{selector:".oj-timepicker-ok-button",ele:d},{selector:".oj-timepicker-hour",ele:d},{selector:".oj-timepicker-minute",
ele:d},{selector:".oj-timepicker-meridian",ele:d},{selector:".oj-timepicker-now",ele:d}];if(this.ef&&a===this.ef[0])c="oj-listbox-drop";else if(a===b[0])c="oj-inputdatetime-time-icon";else if(a===this.element[0])c="oj-inputdatetime-time-input";else if(d&&a===d[0])c="oj-timepicker-content";else for(b=0;b<e.length;b++){var d=e[b],f=g(d.selector,d.ele);if(1===f.length&&f[0]===a){c=d.selector.substr(1);break}}return c||this._superApply(arguments)},widget:function(){return this.Tk()?this._super():this.Xh.widget.widget()}});
a.Components.Wn({ojInputTime:{renderMode:a.Components.Ne(function(){return(a.Wc.De("oj-inputdatetime-option-defaults")||{}).renderMode}),keyboardEdit:a.Components.Ne(function(){return(a.Wc.De("oj-inputdatetime-option-defaults")||{}).keyboardEdit}),timePicker:a.Components.Ne(function(){return(a.Wc.De("oj-inputdatetime-option-defaults")||{}).timePicker})}});q.RGa=0;a.Ra("oj.ojInputDateTime",g.oj.ojInputDate,{version:"1.0.0",widgetEventPrefix:"oj",_WIDGET_CLASS_NAMES:"oj-inputdatetime-date-time oj-component oj-inputdatetime",
_INPUT_HELPER_KEY:"inputHelpBoth",options:{converter:a.za.dj(a.Hi.CONVERTER_TYPE_DATETIME).createConverter({day:"2-digit",month:"2-digit",year:"2-digit",hour:"2-digit",hour12:!0,minute:"2-digit"}),renderMode:"jet",timePicker:{timeIncrement:"00:30:00:00",showOn:"focus"}},sH:function(){this._super();this.Pz=this.element;this.VK=this.TE=this.wf=null},_ComponentCreate:function(){var a=this._super(),b=this.a9(this.oc());if(null===b)throw Error("Please use ojInputDate if you do not have time portion");
if(this.bf){var c=g("\x3cinput type\x3d'text'\x3e");c.insertAfter(this.element);this.Pz=c}for(var c="title placeholder disabled required readOnly keyboardEdit pickerAttributes".split(" "),d={},e=0,f=c.length;e<f;e++)d[c[e]]=this.options[c[e]];this.wf=this.Pz.ojInputTime(g.extend(d,{converter:b,displayOptions:{converterHint:"none",title:"none",messages:this.options.displayOptions.messages},value:this.options.value,timePicker:this.options.timePicker,datePickerComp:{widget:this,inline:this.bf}}));return a},
_setOption:function(a,b,c){var d=this._superApply(arguments);"value"===a&&(this.VK=this.options.value);this.wf&&(a in{disabled:!0,readOnly:!0,keyboardEdit:!0}?this.wf.ojInputTime("option",a,b):"timePicker"===a?this.wf.ojInputTime("option","timePicker.timeIncrement",b.timeIncrement):"converter"===a&&(this.TE=null,this.wf.ojInputTime("option",a,this.a9(this.oc()))));return d},_destroy:function(){var a=this._super();this.wf.ojInputTime("destroy");this.bf&&this.Pz.remove();return a},EH:function(){"focus"===
this.options.datePicker.showOn&&g(this.wf.ojInputTime("getNodeBySubId",{subId:"oj-listbox-drop"})).is(":visible")?(this.wf.ojInputTime("hide"),this.qn=!0,this.element.focus()):this._super()},a9:function(a){return null!==this.TE?this.TE:this.TE=t(a)},VLa:function(a,b){var c=this.oc().format(a);this.Hl(c);this.wc(c,b)},dha:function(){if(this.isValid())return this.options.value;if(this.VK)try{return this.oc().parse(this.VK)}catch(a){return this.options.value}else return null},wc:function(a,b,c){this._superApply(arguments);
this.VK=a},OK:function(a){var b=g.ui.keyCode,c=!1;switch(a.keyCode){case b.UP:case b.DOWN:a.shiftKey&&(this.wc(this.Si(),a),this.wf.ojInputTime("show"),c=!0)}return c?(a.preventDefault(),a.stopPropagation(),!1):this._superApply(arguments)},show:function(){m(this)||this.wf.ojInputTime("hide");return this._super()},m3:function(a){a.mode="datetime";var b=r(this.options.timePicker.timeIncrement);a.YNa=0===b.hN?b.WN:1;return this._super(a)},U2:function(b){this.Uo=!1;b&&(b=a.Na._dateTime(this.en(),{month:b.getMonth(),
date:b.getDate(),fullYear:b.getFullYear(),hours:b.getHours(),minutes:b.getMinutes(),seconds:b.getSeconds()}),b=this.oc().format(b),this.wc(b,{}));this.Vo(this.fs)},showTimePicker:function(){this.hide();return this.wf.ojInputTime("show")},hideTimePicker:function(){return this.wf.ojInputTime("hide")},refresh:function(){var a=this._superApply(arguments)||this;this.wf.ojInputTime("refresh");return a},getNodeBySubId:function(a){var b=a&&a.subId,c=null;b&&("oj-listbox-drop"===b||"oj-inputdatetime-time-icon"===
b?c=this.wf.ojInputTime("getNodeBySubId",a):"oj-inputdatetime-date-input"===b&&(c=this.bf?this.Pz[0]:this.element[0]));return c||this._superApply(arguments)},getSubIdByNode:function(a){var b=null;this.bf?a===this.Pz[0]&&(b="oj-inputdatetime-date-input"):a===this.element[0]&&(b="oj-inputdatetime-date-input");return b||this.wf.ojInputTime("getSubIdByNode",a)||this._superApply(arguments)},oc:function(){return this.options.converter?this._superApply(arguments):g.oj.ojInputDateTime.prototype.options.converter},
Gj:function(){this.wf&&this.hideTimePicker();this._superApply(arguments)},Vm:function(){this.wf&&this.hideTimePicker();this._superApply(arguments)},_GetMessagingLauncherElement:function(){return this.bf?this.Pz:this._super()},_GetDefaultStyleClass:function(){return"oj-inputdatetime"},oH:function(){return"oj-ojInputDate"}});a.Components.Xa("ojInputTime","inputBase",{properties:{converter:{},keyboardEdit:{type:"string"},max:{},min:{},pickerAttributes:{type:"Object"},placeholder:{},renderMode:{type:"string"},
timePicker:{type:"Object"},validators:{type:"Array"},value:{type:"string",writeback:!0}},methods:{getNodeBySubId:{},getSubIdByNode:{},hide:{},refresh:{},show:{},widget:{}},extension:{_hasWrapper:!0,_innerElement:"input",_widgetName:"ojInputTime"}});a.Components.register("oj-input-time",a.Components.getMetadata("ojInputTime"));(function(){a.Components.Xa("ojInputDate","inputBase",{properties:{converter:{},datePicker:{type:"Object"},dayFormatter:{},dayMetaData:{},keyboardEdit:{type:"string"},max:{},
min:{},pickerAttributes:{type:"Object"},placeholder:{},renderMode:{type:"string"},validators:{type:"Array"},value:{type:"string",writeback:!0}},methods:{getNodeBySubId:{},getSubIdByNode:{},hide:{},refresh:{},show:{}},extension:{_hasWrapper:!0,_innerElement:"input",_widgetName:"ojInputDate"}});a.Components.register("oj-input-date",a.Components.getMetadata("ojInputDate"));var b=a.Uc.yf({},a.Components.getMetadata("ojInputDate"),void 0,!0);b.extension._innerElement="div";a.Components.register("oj-date-picker",
b)})();(function(){a.Components.Xa("ojInputDateTime","ojInputDate",{properties:{converter:{},max:{},min:{},renderMode:{type:"string"},timePicker:{type:"Object"},validators:{type:"Array"},value:{type:"string",writeback:!0}},methods:{getNodeBySubId:{},getSubIdByNode:{},hideTimePicker:{},show:{},showTimePicker:{}},extension:{_hasWrapper:!0,_innerElement:"input",_widgetName:"ojInputDateTime"}});a.Components.register("oj-input-date-time",a.Components.getMetadata("ojInputDateTime"));var b=a.Uc.yf({},a.Components.getMetadata("ojInputDateTime"),
void 0,!0);b.extension._innerElement="div";a.Components.register("oj-date-time-picker",b)})()});